-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catalog #4714
base: master
Are you sure you want to change the base?
Catalog #4714
Conversation
AlyonaV22
commented
Oct 8, 2024
- DEMO LINK
- TEST REPORT LINK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on following the HTML structure and adhering to naming conventions! Just remember to keep the minor points in mind for future improvements. Your effort is commendable, and with a little more attention to detail, your code will be even better! 🚀 Keep up the good work!
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="https://apple.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'is-active' class should be 'nav__link--active' to follow the BEM methodology as per the checklist. The modifier should be separated from the block or element name by two hyphens.
<a | ||
class="nav__link" | ||
href="https://en.wikipedia.org/wiki/Laptop" | ||
data-qa="nav-hover" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'data-qa' attribute is used for testing purposes. Ensure that its use here is intentional and that it follows the testing strategy of the project.
src/index.html
Outdated
<a | ||
href="#" | ||
class="card__button" | ||
data-qa="hover" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of the 'data-qa' attribute should be 'card-hover' to maintain consistency across the project, as seen in line 149.
src/styles/blocks/card.scss
Outdated
display: grid; | ||
place-content: center; | ||
place-items: center; | ||
row-gap: 48px 46px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The row-gap
property is used to set the vertical spacing between rows, but here it seems to have two values which is not valid for row-gap
. If you intended to set both the row and column gaps, use the gap
property instead.
src/styles/blocks/card.scss
Outdated
} | ||
|
||
.card { | ||
box-sizing: border-box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Code Style Rules, it's recommended to avoid using box-sizing: border-box;
multiple times. Consider creating a common class or using inheritance to apply this property once globally.
src/styles/blocks/header.scss
Outdated
.is-active::after { | ||
position: absolute; | ||
content: ''; | ||
display: block; | ||
height: 4px; | ||
width: 100%; | ||
background-color: $blue-color; | ||
border-radius: 8px; | ||
bottom: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ::after
pseudo-element is used to create a visual effect under the .is-active
class. Ensure that this effect is not causing any unintended layout shifts or accessibility issues. Also, verify that the $blue-color
variable is defined in your variables file and is consistent with the design requirements.
src/styles/blocks/header.scss
Outdated
a[data-qa='nav-hover'] { | ||
white-space: nowrap; | ||
overflow: hidden; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The white-space
and overflow
properties are set to prevent the text inside the anchor from wrapping and overflowing. However, these properties are not necessary if the text content fits within the anchor's width. Make sure that it's actually required to use these properties for the [data-qa='nav-hover']
selector.
src/styles/blocks/header.scss
Outdated
.nav:hover .nav__link { | ||
color: $blue-color; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule will change the color of .nav__link
elements to $blue-color
on hover of the .nav
block. It might cause an unexpected behavior where all links change color even if only one is hovered. Consider applying the hover effect to .nav__link
elements individually unless the group behavior is intentional.
src/styles/blocks/stars.scss
Outdated
&:last-child::after { | ||
position: absolute; | ||
content: 'Reviews: 5'; | ||
color: $main-text-color; | ||
white-space: nowrap; | ||
font-size: 10px; | ||
line-height: 14px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
font-weight: 400; | ||
right: -70px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of ::after
to add content like 'Reviews: 5' is not recommended for accessibility and semantic reasons. This content seems to be important information that should be part of the HTML document rather than CSS, as it does not appear to be purely decorative. Consider moving this content to the HTML and using an appropriate element and class to style it.
src/styles/blocks/stars.scss
Outdated
.stars--4 .stars__star:nth-child(-n + 4) { | ||
background-image: url(../images/star-active.svg); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The selector '.stars--4 .stars__star:nth-child(-n + 4)' specifies a modifier class 'stars--4', which is good. However, ensure that you have corresponding styles for other possible star ratings (e.g., '.stars--1', '.stars--2', '.stars--3', etc.) to match different rating scenarios. If they are missing, add them to maintain consistency and complete functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/index.html
Outdated
<img | ||
class="card__item" | ||
src="./images/imac.jpeg" | ||
alt="imac" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/styles/blocks/card.scss
Outdated
.container { | ||
grid-template-columns: repeat(1, 1fr); | ||
} | ||
} | ||
|
||
@media (min-width: 488px) { | ||
.container { | ||
grid-template-columns: repeat(2, 1fr); | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.container { | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
} | ||
|
||
@media (min-width: 1024px) { | ||
.container { | ||
grid-template-columns: repeat(4, 1fr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nesting in scss
src/styles/blocks/card.scss
Outdated
.card:hover { | ||
transform: scale(1.2); | ||
} | ||
|
||
.card:hover .card__title { | ||
color: $title-color; | ||
} | ||
|
||
.card__button:hover { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting
height: 40px; | ||
} | ||
|
||
.nav { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a separate file per each styles block
src/styles/blocks/header.scss
Outdated
} | ||
|
||
.nav { | ||
transition: all 300ms ease; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify to which properties should transition apply instead of all
src/styles/blocks/header.scss
Outdated
} | ||
} | ||
|
||
.nav__list { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nesting, fix in all places
src/styles/blocks/header.scss
Outdated
a[data-qa='nav-hover'] { | ||
white-space: nowrap; | ||
overflow: hidden; | ||
} | ||
|
||
a[data-qa='nav-hover']:hover { | ||
color: $blue-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use data-qa
selector, it for tests only, all links should have hover effect
src/styles/blocks/stars.scss
Outdated
} | ||
} | ||
|
||
.stars--4 .stars__star:nth-child(-n + 4) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be the same functionality as in the stars task, if the modifier is --3
you should show 3 active stars, if --4
- four, and so on